Repository navigation
fix(console): a partly failed bulk approve names each failed row with its reason - #37282
Conversation
… its reason Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW
…mat string Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW
…as a narrowing Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ Contract reviewServed-tier: Face: narrowing ( ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Two findings are open, S1 and S2. Each needs a head change and a delta review; this record does not clear the head. Implemented-by: VERDICT: PASS |
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — REWORK · L1 · head
|
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW
…back Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW
|
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW Final green head for the delta L1 and same-head contract review (2026-11-25T14:35Z):
|
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — ACCEPT · L1 · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ Contract reviewServed-tier: Face: narrowing ( ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
No must-fix, no should-fix. Nothing above needs a head change. This record clears the head. Implemented-by: VERDICT: PASS |
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 维护者速读
Approval request at 2026-11-25T14:52Z. Seat opinion: approve. The change is small and stays inside the Approval Center page and the eleven locale packs. Both findings of the last round are closed at this head: a toast's "Show all" lists its own run's failures (pinned, and the pin goes red when the fix is removed), and the changeset now describes the fallback text correctly. The one retired key has no reader, it is the only released key this PR removes, and it is declared with its eleven locales. Checks at the head are 47 success, 15 expected skips and 0 failed; the full dogfood battery passed on this head; the merge with current main is clean (K = 19). Four nits stay open and need no head change. The one worth a follow-up card: a bulk run that ends after the page is left still raises its toast, and that toast's "Show all" opens nothing. |
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW
Fixes #36855
Clause-②: yes (narrowing)
Metadata-protocol: none
Skills-docs: none — no page under
skills/orcontent/docs/names the Approval Center's bulk-failure string or teaches overriding it维护者速读
What changes
runBulkinui/apps/console/src/pages/system/ApprovalsInboxPage.tsxcaught each failure with a barecatchand kept only the record title. Now each failure keeps{ id, title, reason }, wherereasonishumanizeError(err, tr('actionFailed', 'Action failed')): the same reader the single-row Approve and Reject use. It returns the server'suserMessage(viadeclaredUserMessage) when the refusal carries one, else the page's localized line for the refusal (not allowed, already decided, no longer exists), else the error's own text (approvalsApi.callalways sets one asCODE: message, so a 500 readsAPPROVAL_APPROVE_FAILED:plus the server's text). The genericAction failedis reached only by an error with no message.The partial-failure toast is now titled "N succeeded, M failed" and its description lists the first three failed rows, one per line, as "title: reason". The toast stays until dismissed (
duration: Infinity, close button), whatever the count. When more than three fail, it carries a "Show all (M)" action. The action closes over that run's own list: it puts that list into the dialog and opens it, so a toast still on screen after a later run shows its own rows. The dialog lists every failed row with its reason. The page dismisses its failure toasts on unmount, because their action opens a dialog that lives in the page. The dialog is rendered outside the bulk bar, so it survives the selection being cleared. The console had no existing overflow pattern for a bulk toast. The nearest ones (AppManagementPagebulk toggle, the Studio save bar) put all lines into one toast with no cap, which is what this card asks to avoid. So I used a toast action plus anAlertDialog, built from components the page already imports.Locale packs (
ui/packages/i18n/src/locales/*.ts, all 11):approvalsInbox.bulkPartialis replaced bybulkPartialSummary,bulkFailureLine,bulkFailuresShowAll,bulkFailuresTitle,bulkFailuresBodyandclose. Key parity holds.zh-Hant.tsis regenerated from zh-Hans (gen:zh-hant).bulkFailureLineis added to theuntranslated-identityallowlist as a format string (holes and a colon), the same aslistConditions.chips.pattern.Read first, by risk:
ApprovalsInboxPage.tsx, therunBulkhunk: the reason reader and the overflow branch of the toast options.ApprovalsInboxPage.tsx, the newAlertDialogafter the bulk action bar.ApprovalsInboxPage.inlineActionsVisible-34587.test.tsx: the stub translator now interpolates{{name}}holes. No existing assertion in that file used a hole.Two-minute check:
cd ui && pnpm exec vitest run apps/console/src/pages/system/ApprovalsInboxPage.inlineActionsVisible-34587.test.tsxshould report 10 passed. The four cases under "a partly failed bulk approve says why each row failed" are the new pins.Tests
New top-level
describein the shared inbox harness fileApprovalsInboxPage.inlineActionsVisible-34587.test.tsx, beside the #36463 refusal pin:1 succeeded, 1 failed, and its description isBulk Invoice 2:followed by the server's markeduserMessage, with no overflow action;userMessageand 409 already-decided): the toast lists the first three with reasons, its action readsShow all (5)and the toast is sticky. Clicking the action opens the dialog, and every one of the five rows appears with its own reason. The succeeding row does not appear.Show all (5)still opensNot decided: 5with rows 1 to 5. This is the L1 repro; it readNot decided: 0and an empty list before.Ablation through
scripts/ablation-replace.mjs: the reason was replaced with''. The mutation landed (anchor 1 to 0, blob d21c8808ce8e to 8724dfc2388a). Two pins went red (expected 'Bulk Invoice 2: ' to be 'Bulk Invoice 2: ...', Tests 2 failed / 7 passed). The file was restored, blob equal to HEAD andgit diff HEADempty.Second ablation (own-run list), on head e1ea082. Two held mutations through
scripts/ablation-replace.mjsput back the shared-state design: the action'ssetBulkFailures(failures);becamevoid failures;, andsetBulkFailures(failures);was written at the end of every run. Both landed (blob a729e1db98b7 to 7cfb74cd2d70 to c783de858825). The two-run pin went red, with the dialog readingNot decided: 0, which is the L1 repro (Tests 1 failed / 9 passed). Restored with--restore: blob equal to the HEAD blob a729e1db98b7,git diff HEADempty.Removed translation keys
approvalsInbox.bulkPartial(@object-ui/i18n, released in 18.6.0) is retired from all eleven packs it shipped in: ar, de, en, es, fr, ja, ko, pt-BR, ru, zh-Hans and zh-Hant. This follows the 19.0.0 key-retirement ruling (7153171432 / 7153326968). It is BREAKING only for a host that overrides that key: the override is no longer shown. The changeset carries the ADR-0087 dispositionnot-required (no-migration-prescription).No reader is left. On head 935499b,
git grepforbulkPartial(excludingbulkPartialSummary) acrossui packages apps examples skillsgave exit 1, no hits. Every dynamicapprovalsInbox.+ key construction is a wrapper: five definitions in four files (the console page'str,RecordApprovalsPanel, two inApprovalDecisionPanel,ApprovalActionTimeline). None of them is called with a non-literal key (git grepexit 1). The release tag@object-ui/i18n@18.6.0carries the key in all 11 packs.Acceptance notes
humanizeError's last fallback iserr.message || fallback. A refusal with nouserMessageand no recognised code or status therefore shows the error's own message, exactly as the single-row Approve does today. That keeps one reader, as the card asks. It is not narrowed here.runBulk, so it gets the same feedback.Verification
Code and test runs were on head 935499b. Head b646804 adds only the changeset declaration; its gates are listed below.
Tests
cd ui && pnpm exec vitest run apps/console/src/pages/system/ApprovalsInboxPage packages/i18n/src/__tests__/{untranslated-identity-4376,zh-hant-generated,all-locales-key-parity,en-zh-key-parity}.test.ts: Test Files 25 passed (25), Tests 185 passed (185).bulkFailureLineidentity) were fixed in 935499b and re-run green.pnpm --filter @object-ui/console type-checkandpnpm --filter @object-ui/i18n type-check: exit 0. The console tsconfig includessrc, so the test file is compiled.Derived gates
dispatch-gates --commandsderived 41 families. 40 exited 0.pnpm --dir ui exec vitest run scripts/first hit a lock queue-timeout (exit 99, never ran). The re-run on 935499b exited 0: Test Files 172 passed, 2 skipped.--ranreconciliation: 41 derived, 41 run, 0 NOT-MEASURED, 0 UNRUN.check:type-check-debtfirst exited 3: PREREQUISITE NOT MET, because its closure build lost the lock queue to this PR's own dogfood run. Re-run under the lock it exited 0 (130/133 type-checked, 0 re-measured above record).check-adr-0087-registration(1 declared-breaking changeset, dispositionnot-required (no-migration-prescription)),check-changeset-no-major,check-empty-changesetandcheck:nul-byteswere re-run on c98f1ce and exited 0.pnpm --dir ui exec vitest run scripts/was not re-run after the changeset-only commits; its reading is from 935499b.Round 3 (L1 S1/S2, head bc98914)
setBulkFailures(failures)runs inonClick, not at the end of every run). The page dismisses its sticky failure toasts on unmount.ApprovalsInboxPage.inlineActionsVisible-34587.test.tsx: Tests 10 passed (10). All inbox files (apps/console/src/pages/system/ApprovalsInboxPage, with the console type-check first): Test Files 21 passed (21), Tests 120 passed (120). Type-check exit 0.vitest run scripts/andcheck:type-check-debtran under the lock.--rangives 0 NOT-MEASURED, 0 UNRUN.Dogfood battery (owed by the narrowing arm)
@objectstack/dogfood^...closure was built, thenpnpm --filter @objectstack/dogfood testran under the lock on head b646804. VERDICT command-exit 0. Test Files 487 passed, 3 skipped (490). Tests 4128 passed, 68 skipped (4196).Generated by Claude Code